3.2574 \(\int (1+x)^p \left (1-x+x^2\right )^p \, dx\)

Optimal. Leaf size=41 \[ x (x+1)^p \left (x^2-x+1\right )^p \left (x^3+1\right )^{-p} \, _2F_1\left (\frac{1}{3},-p;\frac{4}{3};-x^3\right ) \]

[Out]

(x*(1 + x)^p*(1 - x + x^2)^p*Hypergeometric2F1[1/3, -p, 4/3, -x^3])/(1 + x^3)^p

_______________________________________________________________________________________

Rubi [A]  time = 0.0324648, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125 \[ x (x+1)^p \left (x^2-x+1\right )^p \left (x^3+1\right )^{-p} \, _2F_1\left (\frac{1}{3},-p;\frac{4}{3};-x^3\right ) \]

Antiderivative was successfully verified.

[In]  Int[(1 + x)^p*(1 - x + x^2)^p,x]

[Out]

(x*(1 + x)^p*(1 - x + x^2)^p*Hypergeometric2F1[1/3, -p, 4/3, -x^3])/(1 + x^3)^p

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 5.31863, size = 32, normalized size = 0.78 \[ x \left (x + 1\right )^{p} \left (x^{3} + 1\right )^{- p} \left (x^{2} - x + 1\right )^{p}{{}_{2}F_{1}\left (\begin{matrix} - p, \frac{1}{3} \\ \frac{4}{3} \end{matrix}\middle |{- x^{3}} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((1+x)**p*(x**2-x+1)**p,x)

[Out]

x*(x + 1)**p*(x**3 + 1)**(-p)*(x**2 - x + 1)**p*hyper((-p, 1/3), (4/3,), -x**3)

_______________________________________________________________________________________

Mathematica [C]  time = 0.190506, size = 132, normalized size = 3.22 \[ \frac{\left (\frac{-2 i x+\sqrt{3}+i}{\sqrt{3}+3 i}\right )^{-p} \left (\frac{2 i x+\sqrt{3}-i}{\sqrt{3}-3 i}\right )^{-p} (x+1)^{p+1} \left (x^2-x+1\right )^p F_1\left (p+1;-p,-p;p+2;\frac{2 i (x+1)}{3 i+\sqrt{3}},-\frac{2 i (x+1)}{-3 i+\sqrt{3}}\right )}{p+1} \]

Warning: Unable to verify antiderivative.

[In]  Integrate[(1 + x)^p*(1 - x + x^2)^p,x]

[Out]

((1 + x)^(1 + p)*(1 - x + x^2)^p*AppellF1[1 + p, -p, -p, 2 + p, ((2*I)*(1 + x))/
(3*I + Sqrt[3]), ((-2*I)*(1 + x))/(-3*I + Sqrt[3])])/((1 + p)*((I + Sqrt[3] - (2
*I)*x)/(3*I + Sqrt[3]))^p*((-I + Sqrt[3] + (2*I)*x)/(-3*I + Sqrt[3]))^p)

_______________________________________________________________________________________

Maple [F]  time = 0.155, size = 0, normalized size = 0. \[ \int \left ( 1+x \right ) ^{p} \left ({x}^{2}-x+1 \right ) ^{p}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((1+x)^p*(x^2-x+1)^p,x)

[Out]

int((1+x)^p*(x^2-x+1)^p,x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int{\left (x^{2} - x + 1\right )}^{p}{\left (x + 1\right )}^{p}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 - x + 1)^p*(x + 1)^p,x, algorithm="maxima")

[Out]

integrate((x^2 - x + 1)^p*(x + 1)^p, x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left ({\left (x^{2} - x + 1\right )}^{p}{\left (x + 1\right )}^{p}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 - x + 1)^p*(x + 1)^p,x, algorithm="fricas")

[Out]

integral((x^2 - x + 1)^p*(x + 1)^p, x)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \left (x + 1\right )^{p} \left (x^{2} - x + 1\right )^{p}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((1+x)**p*(x**2-x+1)**p,x)

[Out]

Integral((x + 1)**p*(x**2 - x + 1)**p, x)

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int{\left (x^{2} - x + 1\right )}^{p}{\left (x + 1\right )}^{p}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 - x + 1)^p*(x + 1)^p,x, algorithm="giac")

[Out]

integrate((x^2 - x + 1)^p*(x + 1)^p, x)